﻿using System;
using System.Windows.Forms;
using ServiceConsumeDemo.BankServiceReference;
using ServiceConsumeDemo.SOAPServiceReference;


namespace ServiceConsumeDemo
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void btnAverage_Click(object sender, EventArgs e)
        {
           // Banks bank=new Banks();
           //var avg= bank.Average(Convert.ToInt32(txtNo1.Text), Convert.ToInt32(txtNo2.Text));
           // label4.Text = "Average is " + avg;

            BanksSoapClient banksSoapClient = new BanksSoapClient();

            var avg = banksSoapClient.Average(Convert.ToInt32(txtNo1.Text), Convert.ToInt32(txtNo2.Text));
            label4.Text = "Average is " + avg;

            BankWebServiceClient client =new BankWebServiceClient(); 

            UserCredentials credential=new UserCredentials();
            credential.userid = "amaity@eforceglobal.com";
            credential.password = "1234";
            credential.isSoftDeleted =true;


            label3.Text = client.HelloWorld(credential, "Arun");
        }
    }
}
